home *** CD-ROM | disk | FTP | other *** search
- /*
- File: FX.h
-
- Contains:
-
- Written by: Edgar Lee
-
- Copyright: Copyright © 1992-1999 by Apple Computer, Inc., All Rights Reserved.
-
- You may incorporate this Apple sample source code into your program(s) without
- restriction. This Apple sample source code has been provided "AS IS" and the
- responsibility for its operation is yours. You are not permitted to redistribute
- this Apple sample source code as "Apple sample source code" after having made
- changes. If you're going to re-distribute the source, we require that you make
- it clear in the source that the code was descended from Apple sample source
- code, but that you've made changes.
-
- Change History (most recent first):
- 7/13/1999 Karl Groethe Updated for Metrowerks Codewarror Pro 2.1
-
-
- */
- #include <Types.h>
- #include <Windows.h>
-
- #define numTItems 8
- #define numAItems 8
- #define numCItems 4
- #define numMItems 3
- #define numDItems 2
- #define numBItems 3
- #define numPItems 2
- #define numLItems 2
-
- enum {
- transferID = 1,
- arithmeticID,
- ditherID,
- colorizationID,
- searchProcID,
- paintBucketID,
- lassoID,
- pixelAverageID,
- customID
- };
-
- typedef struct {
- Str255 label;
- Rect rect;
- } itemType;
-
- typedef struct {
- int tItem;
- int aItem;
- int cItem;
- int mItem;
- int dItem;
- int bItem;
- int pItem;
- int lItem;
- } itemSettings;
-
- extern WindowPtr gWindow;
- extern GWorldPtr gGWorld;
- extern int gCurrentExample;
- extern itemSettings settings;
-
- extern itemType tItem[numTItems];
- extern itemType aItem[numAItems];
- extern itemType cItem[numCItems];
- extern itemType dItem[numDItems];
- extern itemType mItem[numMItems];
- extern itemType bItem[numBItems];
- extern itemType pItem[numPItems];
- extern itemType lItem[numLItems];
-
- void initMac();
- void resetItems();
- void createWindow();
- void createOffscreen();
- void defineItems();
- void updateWindow();
- void drawBackground();
- void drawAllItems();
- void drawSourceImage();
- long drawFXImage();
-
- void drawTransferItems();
- void drawArithmeticItems();
- void drawColorizeItems();
- void drawDitherItems();
- void drawMappingItems();
- void drawDestinationItems();
- void drawPaintBucketItems();
- void drawLassoToolItems();
-
- void drawExampleName();
- void drawTime();
-
- void drawName();
- void drawItem();
-
- void drawDeepBox();
- void eraseRect();
-
- void eventLoop();
-
- void setUpMenus();
- void adjustMenus();
- void setMenuItem();
- void handleMenu();
-